package com.company.consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

//这里需要手动制定包扫描路径，否则识别不到API项目中的GoodsClientServiceFallbackFactory，导致项目无法启动
@SpringBootApplication(scanBasePackages = {"com.company.consumer","com.company.api.service"})
@EnableEurekaClient
@EnableFeignClients(basePackages = "com.company.api.service")
//因为Feign接口在另一个API项目中，且API项目的包和当前项目有点不一样，所以需要加上扫描包的范围，确保能扫描到
public class Consumer80FeignApplication {

    public static void main(String[] args) {
        SpringApplication.run(Consumer80FeignApplication.class, args);
    }
}
